﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

namespace IRC.IRepairClouds.WebClient
{
    public partial class LoggedIn : System.Web.UI.MasterPage
    {
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            if (Utils.IsDebug)
            {
                RadScriptManager1.EnableScriptCombine = false;
            }
            else
            {
                RadScriptManager1.EnableScriptCombine = true;
            }

            RadScriptManager1.ResolveScriptReference += new EventHandler<ScriptReferenceEventArgs>(RadScriptManager1_ResolveScriptReference);
        }

        void RadScriptManager1_ResolveScriptReference(object sender, ScriptReferenceEventArgs e)
        {
            //Override teleric's embedded jquery
            if (e.Script.Assembly.StartsWith("Telerik.Web.UI") && e.Script.Name == "Telerik.Web.UI.Common.jQuery.js")
            {
                e.Script.Name = "IRC.IRepairClouds.WebClient.Clients.Scripts.jQuery.jquery-1.6.1.min.js";
                e.Script.Assembly = "IRC.IRepairClouds.WebClient";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}
